package com.hk.snake;

import javax.swing.*;
import java.net.URL;

/**
 * 存放外部数据
 */
public class Data {

//    获取头部的图片 URL:定位图片地址 ImageIcon：图片
    public static URL handerURL = Data.class.getResource("/static/hander.png");
    public  static ImageIcon hander= new ImageIcon(handerURL);
    public static URL headerURL = Data.class.getResource("/static/header1.png");
    public  static ImageIcon header = new ImageIcon(headerURL);
//    获取头部：
    public static URL upURL = Data.class.getResource("/static/up.png");
    public static URL downURL = Data.class.getResource("/static/down.png");
    public static URL leftURL = Data.class.getResource("/static/left.png");
    public static URL rightURL = Data.class.getResource("/static/right.png");
    public  static ImageIcon up = new ImageIcon(upURL);
    public  static ImageIcon down = new ImageIcon(downURL);
    public  static ImageIcon left = new ImageIcon(leftURL);
    public  static ImageIcon right = new ImageIcon(rightURL);
//    身体
    public static URL bodyURL = Data.class.getResource("/static/body.png");
    public  static ImageIcon body = new ImageIcon(bodyURL);
//    食物
    public static URL foodURL = Data.class.getResource("/static/food.png");
    public  static ImageIcon food = new ImageIcon(foodURL);

}
